package toko.domain;

import java.math.BigDecimal;

public class PenjualanDetail {
    private Integer id;
    // Private Integer idPenjualan;
    private Buku buku;
    private Integer quantity;
    private Penjualan penjualan;

    public BigDecimal SubTotal(){
        return buku.getHarga().multiply(new BigDecimal(quantity));
    }

    public Buku getBuku() {
        return buku;
    }

    public void setBuku(Buku buku) {
        this.buku = buku;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Penjualan getPenjualan() {
        return penjualan;
    }

    public void setPenjualan(Penjualan penjualan) {
        this.penjualan = penjualan;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }
    }